package site.wetsion.employ.server.mapper;

import java.math.BigInteger;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import site.wetsion.employ.server.pojo.CompanyComment;
import site.wetsion.employ.server.pojo.JobRemark;

/**
 * 公司评论和职位评论dao
 * @author Wetsion
 *
 */
public interface CommentRemarkMapper {
	
	/**		<----------------公司评论------------------>	*/
	/** 插入一条公司评论记录*/
	public void insertCompanyComment(CompanyComment comment) throws Exception;
	/** 根据公司id分页获取评论*/
	public List<CompanyComment> getCommentListByCompanyIdByPage(
			@Param("page") int page, 
			@Param("pageSize") int pageSize, 
			@Param("companyId") BigInteger companyId) throws Exception;
	/** 更新comment_prefer字段*/
	public void updateCommentPrefer(BigInteger commentId) throws Exception;
	/** 根据公司id获取该公司所有评论的数量*/
	public int getCommentCountOfCompanyId(BigInteger companyId) throws Exception;
	
	public List<CompanyComment> getCommentListByPage(
			@Param("page") int page, 
			@Param("pageSize") int pageSize) throws Exception;
	
	/**		<----------------职位评论------------------>	*/
	/** 插入一条职位评论记录*/
	public void insertJobRemark(JobRemark remark) throws Exception;
	
	/** 根据职位id分页获取职位评论*/
	public List<JobRemark> getRemarkListByJobIdByPage(
			@Param("page") int page, 
			@Param("pageSize") int pageSize, 
			@Param("jobId") BigInteger jobId) throws Exception;
	/** 更新remark_agree字段*/
	public void updateRemarkAgree(BigInteger remarkId) throws Exception;
	/** 根据职位id获取该职位下所有评论的数量*/
	public int getRemarkCountOfJobId(BigInteger jobId) throws Exception;
}
